package co.fitstart.weapp.api.dao;

import java.util.List;

import com.demo2do.core.persistence.annotation.Dao;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Variable;

import co.fitstart.entity.coach.CoachStudentRelation;
import co.fitstart.entity.course.CourseType;
import co.fitstart.entity.principal.Principal;

@Dao("hibernate")
public interface CoachCourseDao {
	
	
	 /**
	  * @Description: 根据教练和课程类型查询教练执教的课程
	  * @param:  @param principal
	  * @param:  @param courseType
	  * @param:  @return 
	  * @return:  List<CoachStudentRelation>
	  */
	@Query("FROM CoachStudentRelation WHERE coach = :coach AND courseType = :courseType")
    public List<CoachStudentRelation> list(@Variable("coach") Principal coach, @Variable("courseType") CourseType courseType);

}
